import com.gange.springboot.Application;
import com.gange.springboot.entity.User;
import com.gange.springboot.service.UserService;
import com.gange.springboot.service.impl.UserServiceImpl;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

//把测试让spring管理起来
@SpringBootTest(classes = Application.class)
@RunWith(SpringRunner.class)
public class Main {
    @Autowired
    private UserService us ;
    @Test
    public void testLogin(){
        User zhangsan = us.login("zhangsan", "1236");
        System.out.println(zhangsan);
    }
}
